import {IsString,IsInt,MaxLength,MinLength,IsNotEmpty,Length} from 'class-validator'
import {ApiProperty} from '@nestjs/swagger'
export class CreateUserDto {
  @ApiProperty({required:true,description:'用户名'})
  @IsString({message:'用户名必须是字符串'})
  @IsNotEmpty({message:'用户名不能为空'})
  username:string

  @ApiProperty({required:true,description:'密码'})
  @IsString({message:'密码必须是数值'})
  @IsNotEmpty({message:'密码不能为空'})
  // @MinLength(6)
  // @MaxLength(16)
  @Length(6,12)
  password:string
}